package com.example.photograph.domain;

import java.io.Serializable;

public class AppPhoneSearch implements Serializable {

    private String phone;

    private Boolean done;
    
    
    private Long userId;

    public SysAppPhone toSysAppPhone(){
        SysAppPhone sysAppPhone = new SysAppPhone();
        sysAppPhone.setPhone(phone);
        if (done!=null && done){
            sysAppPhone.setLastUpdateTime(System.currentTimeMillis());
        }else if (done!=null){
            sysAppPhone.setLastUpdateTime(-1L);
        }
        sysAppPhone.setUserId(userId);
        return sysAppPhone;
    }

    public AppPhoneSearch(String phone, Boolean done, Long userId) {
        this.phone = phone;
        this.done = done;
        this.userId = userId;
    }

    public AppPhoneSearch() {
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Boolean getDone() {
        return done;
    }

    public void setDone(Boolean done) {
        this.done = done;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
}